package queue;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import org.apache.mina.filter.codec.protobuf.TestProto;
import org.apache.mina.filter.codec.protobuf.TestProto.Foo;

public class Main {

	public static void main(String[] args) {
		
		ExecutorService executorService = Executors.newFixedThreadPool(5);
		
		Server server = new Server();
		server
			.setPort(6667)
			.setPrototype(TestProto.Foo.getDefaultInstance())
			.setExecutor(executorService)
			.start();
		
		
//		NonBlockingClient client = new NonBlockingClient();
//		client
//			.setPort(6667)
//			.setHostname("localhost")
//			.setExecutor(executorService)
//			.start();
		
//		BlockingClient client = new BlockingClient();
//		client
//			.setHostname("localhost")
//			.setPort(6667)
//			.start();
		
//		Queue queue = client.getQueue();
//		queue.put(Foo.newBuilder().setFoo(666).build());
//		queue.put(Foo.newBuilder().setFoo(1).build());
//		queue.put(Foo.newBuilder().setFoo(Integer.MAX_VALUE).build());
		
		
	}

}
